import mpAccountApi from '@/api/declaration/mp/mpAccountApi'
import httpRequest from '@/config/axios/httpRequest'



// 创建公众号账号
export const createAccount = async (data) => {
  return await httpRequest.post(mpAccountApi.CreateAccount, data)
}

// 更新公众号账号
export const updateAccount = async (data) => {
  return httpRequest.put(mpAccountApi.UpdateAccount, data)
}

// 删除公众号账号
export const deleteAccount = async (id) => {
  return httpRequest.delete(mpAccountApi.DeleteAccount, { params: { id } })
}

// 获得公众号账号
export const getAccount = async (id) => {
  return httpRequest.get(mpAccountApi.GetAccount, { params: { id } })
}

// 获得公众号账号分页
export const getAccountPage = async (query) => {
  return httpRequest.get(mpAccountApi.GetAccountPage, { params: query })
}

// 获取公众号账号精简信息列表
export const getSimpleAccountList = async () => {
  return httpRequest.get(mpAccountApi.GetSimpleAccountList)
}

// 生成公众号二维码
export const generateAccountQrCode = async (id) => {
  return httpRequest.put(mpAccountApi.GenerateAccountQrCode, { id })
}

// 清空公众号 API 配额
export const clearAccountQuota = async (id) => {
  return httpRequest.put(mpAccountApi.ClearAccountQuota, { id })
}
